{% extends "base.html" %}

{% block title %}CTF{% endblock %}

{% block page_content %}
<div class="page-header">
    <h1>Hello, {% if current_user.is_authenticated %}{{ current_user.name }}{% else %}Stranger{% endif %}!</h1>
</div>
<div>
    {% if current_user.is_authenticated %}
    <table class="table table-striped">
        <tr>
            <td>Team</td>
            <td>{{ current_user.team.name }}</td>
        </tr>
        <tr>
            <td>Team Key</td>
            <td>{{ current_user.team.key }}</td>
        </tr>
        <tr>
            <td>Score</td>
            <td>{{ current_user.team.score }}</td>
        </tr>
        <tr>
            <td>Team Members</td>
            <td>{{ members[0].user }}</td>
        </tr>
        {% for member in members[1:] %}
        <tr>
            <td></td>
            <td>{{ member.user }}</td>
        </tr>
        {% endfor %}
    </table>
    {% endif %}
</div>
{% endblock %}
